package com.dayaokeji.rhythmschoolstudent.client.home.course.adapter

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dayaokeji.rhythmschoolstudent.R
import com.dayaokeji.rhythmschoolstudent.client.common.base.common.remoteImageUrl
import com.dayaokeji.rhythmschoolstudent.glide.GlideUrlModel
import com.dayaokeji.rhythmschoolstudent.glide.GlideUtils
import com.dayaokeji.server_api.domain.Member

/**
 *********************************************************************
 **  Created by Zeno on 2018/8/3
 *********************************************************************
 **  version 1.0
 *********************************************************************
 **  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 *********************************************************************
 **
 *********************************************************************
 */
class MembersAvatarAdapter: BaseQuickAdapter<Member,BaseViewHolder>(R.layout.item_avatar_25) {

    override fun convert(helper: BaseViewHolder?, item: Member?) {
        val ivAvatar = helper?.getView<ImageView>(R.id.iv_avatar)
        GlideUtils.with(mContext).load(GlideUrlModel(remoteImageUrl+item?.resourceId)).into(ivAvatar!!)
    }
}